﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UMLTouch.Core.Entities
{
    public class TrianglePattern : IShapePattern
    {
        #region IShapePattern Members

        public ShapePatternMatchingResult Match(Shape shape)
        {
            if (shape.NbSegments < 3)
            {
               
                return ShapePatternMatchingResult.MightMatch;
            }
            else if (shape.NbSegments == 3)
            {
                
                return ShapePatternMatchingResult.Match;
            }
            else
            {
               
                return ShapePatternMatchingResult.DontMatch;
            }

        }

        #endregion

        public override string ToString()
        {
            return "Triangle";
        }
    }
}
